// Defines for GNU/Linux
{$IFDEF LINUX}
  // custom -----------------
  {.$DEFINE USE_ZLIB_STATIC}
  {$DEFINE USE_OGG_STATIC}
  {$DEFINE USE_THEORA_STATIC}
  // ------------------------

  {$DEFINE USE_X11}
  {$DEFINE USE_LIBJPEG}
  {$DEFINE USE_OPENAL}
  {$DEFINE USE_VORBIS}

  {$IFDEF CPUARM} // Tricky and bad method, I know :)
    {$DEFINE ANDROID}
    {$DEFINE USE_GLES}
    {$DEFINE NO_EGL}
    {$UNDEF  USE_X11}
    {$UNDEF  USE_ZLIB_STATIC}
    {$UNDEF  USE_OGG_STATIC}
    {$UNDEF  USE_THEORA_STATIC}

    // custom ------------
    // If you don't need to decode theora, you can uncomment this DEFINE and comment UNDEF for USE_OGG_STATIC above
    // for better performance of decoding ogg audio
    {.$DEFINE USE_TREMOLO}
    // -------------------
  {$ENDIF}
{$ENDIF}

// Defines for Windows and Windows Mobile
{$IFDEF MSWINDOWS}
  {$DEFINE WINDOWS}
{$ENDIF}
{$IFDEF WINDOWS}
  // custom -----------------
  {$DEFINE USE_ZLIB_STATIC}
  {$DEFINE USE_LIBJPEG}
  {.$DEFINE USE_OPENAL}
  {$DEFINE USE_OGG_STATIC}
  {$DEFINE USE_THEORA_STATIC}
  // ------------------------

  {$DEFINE USE_VORBIS}
{$ENDIF}

// Defines for MacOS X and iOS
{$IFDEF DARWIN}
  // custom -----------------
  {.$DEFINE USE_ZLIB_STATIC}
  {$DEFINE USE_OGG_STATIC}
  {$DEFINE USE_THEORA_STATIC}
  // ------------------------

  {$DEFINE USE_LIBJPEG}
  {$DEFINE USE_OPENAL}
  {$DEFINE USE_VORBIS}

  {$IF DEFINED(iPHONESIM) or (DEFINED(DARWIN) and DEFINED(CPUARM))}
    {$DEFINE iOS}
    {$DEFINE USE_GLES}
    {$DEFINE NO_EGL}
    {$UNDEF  USE_ZLIB_STATIC}
    {$UNDEF  USE_LIBJPEG}
    {$DEFINE USE_OGG_STATIC}
    {$DEFINE USE_THEORA_STATIC}

    {$IFNDEF iPHONESIM}
      // custom -----------
      // If you don't need to decode theora, you can uncomment this DEFINE
      {.$DEFINE USE_TREMOR}
      // ------------------
    {$ENDIF}
  {$ELSE}
    {$DEFINE MACOSX}
  {$IFEND}
{$ENDIF}

// OpenGL ES render for PC
{.$DEFINE USE_GLES}
{$IFDEF USE_GLES}
  {.$DEFINE USE_GLES_ON_DESKTOP}
  {$IFDEF USE_GLES_ON_DESKTOP}
    {.$DEFINE USE_AMD_DRIVERS}
  {$ENDIF}
{$ENDIF}

// Functionality
{.$DEFINE USE_LOG_FLUSH}
{$DEFINE USE_ZIP}
{$DEFINE USE_JOYSTICK}
{$DEFINE USE_JPG}
{$DEFINE USE_PNG}
{$DEFINE USE_PVR}
{$DEFINE USE_TGA}
{$DEFINE USE_SENGINE}
{$DEFINE USE_PARTICLES}
{$DEFINE USE_SOUND}
{$IFDEF USE_SOUND}
  {$DEFINE USE_OGG}
  {$DEFINE USE_WAV}
{$ENDIF}
{$DEFINE USE_VIDEO}
{$IFDEF USE_VIDEO}
  {$DEFINE USE_THEORA}
{$ENDIF}
{$DEFINE USE_TRIANGULATION}

// Enable if you want to use zlib compression functions
// WARNING: ZenGL doesn't provide all needed object files, you should use yours(just have no desire to recompile zlib for every platform)
{$IFDEF USE_ZLIB_STATIC}
  {.$DEFINE USE_ZLIB_FULL}
{$ENDIF}

// Disable unsupported features
{$IF DEFINED(USE_TREMOLO) or DEFINED(USE_TREMOR)}
  {$UNDEF USE_VORBIS}
  {$UNDEF USE_THEORA}
{$IFEND}
{$IFNDEF FPC}
  {$UNDEF USE_OGG_STATIC}
  {$UNDEF USE_THEORA_STATIC}
{$ENDIF}

// Specially for buggy Delphi, which trying to parse everything...
{$IFDEF FPC}
  {$I zgl_fpc.cfg}

  {$IFNDEF MACOSX}
    {$IFDEF cpui386}
      {$DEFINE USE_ASM}
    {$ENDIF}
  {$ENDIF}
{$ELSE}
  {$MINENUMSIZE 4}
  {$DEFINE USE_ASM}
  {$DEFINE CPUi386}
  {$WARN COMBINING_SIGNED_UNSIGNED OFF}
  {$WARN COMPARING_SIGNED_UNSIGNED OFF}
{$ENDIF}
